W4. Fundamental Subspaces
1. Theory
1.1 Four Fundamental Subspaces of a Matrix
Every matrix defines four important vector subspaces that reveal its complete algebraic structure. Understanding these subspaces is essential for solving systems of equations, understanding matrix transformations, and applications in data science and engineering.
For an
1. Column Space
The column space is the set of all possible linear combinations of the columns of
- It is a subspace of
(the “output space”) - Its dimension is
(the rank) - The system
has a solution if and only if - Basis: The pivot columns of the original matrix
(identified from the row echelon form)
2. Null Space
The null space is the set of all vectors that
- It is a subspace of
(the “input space”) - Its dimension is
(the number of free variables) - It contains all solutions to the homogeneous system
- Basis: The special solutions found by setting each free variable to 1 (and others to 0)
3. Row Space
The row space is the span of the rows of
- It is a subspace of
- Its dimension is
(the same as the column space) - Basis: The nonzero rows of the row echelon form (REF) of
- The row space contains all linear combinations of the rows of
4. Left Null Space
The left null space is the null space of
- It is a subspace of
- Its dimension is
- It is called “left” null space because
is equivalent to (y multiplies A from the left) - Basis: Found by solving
using row reduction on
1.1.1 Summary Table
| Subspace | Notation | Lives in | Dimension | How to Find Basis |
|---|---|---|---|---|
| Column Space | Pivot columns of |
|||
| Null Space | Special solutions of |
|||
| Row Space | Nonzero rows of |
|||
| Left Null Space | Special solutions of |
1.1.2 The Rank-Nullity Theorem
The dimensions of these subspaces are not independent. Two fundamental equations connect them:
This simplifies to:
These follow from the Rank-Nullity Theorem: for any matrix, the rank plus the dimension of the null space equals the number of columns.
1.1.3 Computing the Four Subspaces: Step-by-Step
Example Setup: Let
Step 1: Row reduce to REF
The pivots are in columns 1 and 3. Thus
Step 2: Column Space
The pivot columns in the original matrix
Dimension:
Step 3: Row Space
The nonzero rows of
Dimension:
Step 4: Null Space
Solve
Free variables:
Dimension:
Step 5: Left Null Space
Solve
Free variable:
Setting
Dimension:
1.2 Orthogonal Complements
Two subspaces
1.2.1 Definition of Orthogonal Complement
For a subspace
Key fact:
1.2.2 The Fundamental Theorem of Linear Algebra
The four fundamental subspaces come in orthogonal pairs:
Equivalently:
Why is this true? Consider
This says that
1.2.3 Orthogonal Decomposition
The orthogonal complement relationship gives us a powerful decomposition: every vector in
Theorem (Orthogonal Decomposition): If
We write this as:
The symbol
For matrices, this gives two fundamental decompositions:
1.3 Properties of Orthogonal Complements
1.3.1 Property 1: Intersection is Zero
For any subspace
Proof: Suppose
Therefore
1.3.2 Property 2: Dimensions Add to n
For any subspace
Proof sketch: Let
1.3.3 Property 3: Double Complement Returns to V
For any subspace
Proof: We show two inclusions.
(
(
1.3.4 Property 4: Uniqueness of Decomposition
If
Proof: Rearranging:
The left side is in
1.4 Examples of Orthogonal Complements
1.4.1 Geometric Examples in
- If
is the xy-plane (the set ), then is the z-axis (the set ). - If
is a line through the origin with direction vector , then is the plane perpendicular to . - If
, then . - If
, then .
1.4.2 Example in
Let
To find
This gives:
Setting
Thus:
Note:
1.5 Proving the Fundamental Theorem
1.5.1 Proof:
Theorem: For any
Proof: We show both inclusions.
(
Let
Let
Thus
(
Let
In particular,
But this is exactly saying that
Conclusion:
1.5.2 Proof:
This follows immediately from the previous result and Property 3:
Similarly, by applying the same arguments to
1.6 Why Rank of A and are Equal
An important consequence of the Fundamental Theorem is that the row rank equals the column rank.
Theorem:
Proof: From the Rank-Nullity Theorem applied to
From the orthogonal complement relationship:
But
Comparing with the first equation:
This means the number of independent rows equals the number of independent columns!
1.7 Least Squares Problems
When a system
1.7.1 The Least Squares Problem Setup
Problem: Given
Why “least squares”? We’re minimizing the sum of squared errors:
where
1.7.2 Geometric Interpretation
Since
The error vector
1.7.3 Why Least Squares?
Overdetermined systems (
- Data fitting: Fitting a curve or line to experimental data points
- Regression analysis: Finding the best linear model for data
- Signal processing: Estimating a signal from noisy measurements
- Computer graphics: Approximating shapes with simpler models
- Machine learning: Training models where we have many training examples
Instead of giving up, we find the
1.7.4 The Normal Equations (Preview)
The least squares solution
These are called the normal equations. This equation says that the error
Derivation: The error is
If
The matrix
2. Definitions
- Column Space (
or ): The set of all linear combinations of the columns of ; a subspace of with dimension . - Null Space (
or ): The set of all solutions to ; a subspace of with dimension . - Row Space (
or ): The span of the rows of , equivalently the column space of ; a subspace of with dimension . - Left Null Space (
or ): The null space of ; a subspace of with dimension . - Rank: The dimension of the column space (or equivalently, row space) of a matrix.
- Orthogonal Complement (
): For a subspace , the set of all vectors in orthogonal to every vector in . - Orthogonal Subspaces: Two subspaces
and are orthogonal if every vector in is orthogonal to every vector in . - Direct Sum (
): The space of all vectors of the form where and , when . - Least Squares Problem: Finding the vector
that minimizes . - Normal Equations: The system
whose solution gives the least squares solution. - Pseudoinverse: For a matrix
with full column rank, is the left inverse that computes the least squares solution. - Pivot Columns: Columns of the original matrix
that contain pivots in its row echelon form; they form a basis for . - Free Variables: Variables corresponding to non-pivot columns; they parametrize the null space.
- Leading Principal Minor: The determinant of the top-left
submatrix of a matrix (used in LDL^T decomposition).
3. Formulas
- Four Fundamental Subspace Dimensions: For an
matrix with rank : - Rank-Nullity Theorem:
and - Orthogonal Complement Relationships:
and and
- Dimension of Orthogonal Complement:
for any subspace - Direct Sum Decompositions:
- Normal Equations:
- Least Squares Solution (when
has full column rank): - Projection onto Column Space:
- Projection Matrix:
projects onto - LDL^T Decomposition (for symmetric
): where is unit lower triangular and is diagonal
4. Practice
4.1. Four Fundamental Subspaces of a Matrix (Lab 4, Task 1)
Given the matrix
Compute an echelon form of
and its rank .Find a basis for
and for .Find a basis for
and for .State the dimensions of the four fundamental subspaces
, , , and , and verify that they satisfy where is the number of rows of and is the number of columns.
Click to see the solution
Key Concept: Row reduction reveals the rank and provides bases for all four fundamental subspaces simultaneously.
(a) Echelon form and rank:
Row reduce
The echelon form is
(b) Bases for
- Basis for
: The pivot columns of the original matrix (columns 1 and 2): - Basis for
: The nonzero rows of the echelon form:
(c) Bases for
Basis for
: Solve using the echelon form. Free variables are and .From row 2:
.From row 1:
.Setting
: . Setting : .
- Basis for
: Solve . Row reduce :
Free variable:
(d) Dimension verification:
✓ ✓ ✓ ✓
Answer:
4.2. Orthogonal Complement of a Plane (Lab 4, Task 2)
Find the orthogonal complement of the plane spanned by the vectors
Click to see the solution
Key Concept: The orthogonal complement of the row space of
Set up the matrix:
Row reduce the augmented matrix
:Read off the null space: Free variable
.
Answer: The orthogonal complement of the plane is the line
4.3. Orthogonal Complement of Row Space and Decomposition (Lab 4, Task 3)
Find a basis for the orthogonal complement of the row space of
Click to see the solution
Key Concept: The orthogonal complement of
- Find a basis for
:
Free variable
- A basis for
is and (from the RREF rows). - Decompose
: Write :
From rows 1 and 2:
Row space component:
Null space component:
Verify:
✓, and ✓.
Answer: Basis for
4.4. Why These Orthogonality Statements Are False (Lab 4, Task 4)
Why are these statements false?
If
is orthogonal to , then is orthogonal to .If
is orthogonal to and is orthogonal to , then is orthogonal to .
Click to see the solution
Key Concept: Orthogonality is not transitive, and taking complements does not preserve orthogonality. Counterexamples in
(a) Counterexample:
Let
Clearly
Now
Both complements contain the vector
Thus
(b) Counterexample:
Let
: ✓ : ✓- But
, so is not orthogonal to .
The statement is false because orthogonality is not transitive.
Answer: Both statements are false by the counterexamples above.
4.5. Vectors Orthogonal to the Fundamental Subspaces (Lab 4, Task 5)
Find a vector
Click to see the solution
Key Concept: A vector orthogonal to the row space is in the null space; a vector orthogonal to the column space is in the left null space; a vector orthogonal to the null space is in the row space (by the Fundamental Theorem).
- Row reduce
:
Pivot columns: 1 and 3.
(orthogonal to row space): Setting : , . (orthogonal to column space): Solve .
Free variable
- Row space (orthogonal to null space): Any nonzero row of the echelon form:
Answer:
4.6. Block Matrices: Echelon Form and Special Solutions (Lab 4, Task 6)
Find
Click to see the solution
Key Concept: Row operations can be described for block matrices using the same Gaussian elimination. The block structure determines how pivots appear and what the special solutions look like.
Matrix
Echelon form
- From row 2:
. - From row 1:
. - Setting
: special solution .
Matrix
Row reducing
Free variables:
Matrix
Subtract top block from bottom block (
Echelon form of
Answer:
4.7. Construct a System from a Complete Solution (Lab 4, Task 7)
I. Find a
II. Find a
Click to see the solution
Key Concept: The complete solution decomposes as a particular solution plus the null space. We reverse-engineer the matrix and right-hand side.
Part I:
Identify the particular solution and null space direction:
- Particular solution:
- Null space direction:
- Particular solution:
Build
with : Use RREF with free variable : Verify: ✓Compute
:
Part II: Add a third row that is the sum of the first two (so consistency requires
Answer:
- Part I:
- Part II:
4.8. Complete Solutions of Linear Systems (Lab 4, Task 8)
Find the complete solutions of:
Click to see the solution
Key Concept: The complete solution is the sum of a particular solution and the general homogeneous solution. Row reduce the augmented matrix to identify pivot/free variables.
(a):
Row reduce the augmented matrix:
Back-substitute: From row 2:
. From row 1: .- Free variable
: .
- Free variable
Complete solution:
(b):
- Row reduce:
- Free variables
, ; pivot variables , . - Complete solution:
Answer:
- (a):
- (b):
4.9. Normal Vector and Orthogonal Complement of a Plane (Assignment 4, Task 1)
Let
Find a nonzero vector
normal to and verify that .Find a basis for
.Find a basis for
and relate it to .
Click to see the solution
Key Concept: A plane through the origin in
(a) Normal vector:
The plane is
Verification
(b) Basis for
We need two linearly independent solutions of
- Set
: . Vector: . - Set
: . Or set : . Simpler: set : . Vector: .
Basis for
(c) Basis for
Since
Answer:
4.10. Four Subspaces of a Parametric Matrix (Assignment 4, Task 2)
For
Find bases for
, , , and in terms of , , .State explicitly the two orthogonality relations among the four subspaces.
Determine whether the dimensions of the four subspaces change if
.
Click to see the solution
Key Concept: The matrix
(a) Identifying subspaces:
The matrix
: Pivot columns of the original matrix: columns 2, 3, 4. : Nonzero rows of the REF (which is itself): : Free variables are (columns 1, 5, 6). Set each to 1 in turn and solve back. This gives 3 special solutions. : . Since the last row of is zero, satisfies :
(b) Orthogonality relations:
(c) Effect of
If
Answer:
4.11. Four Subspaces of , , and (Assignment 4, Task 3)
Let
Click to see the solution
Key Concept: Compute the matrices explicitly, then determine their ranks and null spaces by row reduction.
Matrix
Row reducing
This is in REF. Pivot columns: 2 and 3. Rank:
where (column 2 of ) and (column 3 of ). . . . : is free; special solution . . : . Solve : . From row 3: ; row 2: ; free. .
Matrix
This is upper triangular with 1s on the diagonal, so it is invertible (
, , , .
Matrix
Row reduce: pivots in columns 2 and 3.
… Column 2 is , column 3 is . , . , . : free variable ; special solution . . : . . free, . .
Answer:
4.12. Is in or ? (First Matrix) (Assignment 4, Task 4)
Let
Click to see the solution
Key Concept: Check
Check
Since
Check
Row reduce:
After Gaussian elimination (checking for consistency), the system is consistent (no pivot in the augmented column). Thus
Answer:
4.13. Is in or ? (Second Matrix) (Assignment 4, Task 5)
Let
Click to see the solution
Check
Since
Check
After row reduction, if a row
Answer:
4.14. Subspaces in vs (Assignment 4, Task 6)
Let
Click to see the solution
Key Concept: The ambient space of each subspace is determined by where the vectors live — input space
- In
: , , — all subsets of the input space. - In
: , , — all subsets of the output space.
Note:
In general, there are 4 distinct subspaces (the four fundamental subspaces).
Answer:
4.15. Justifying the Rank-Nullity Identities (Assignment 4, Task 7)
Let
Click to see the solution
Key Concept: These are the two statements of the Rank-Nullity Theorem applied to
First identity:
The Rank-Nullity Theorem states that for any linear map
For
Second identity:
Apply the Rank-Nullity Theorem to
Since
Answer: Both identities follow directly from the Rank-Nullity Theorem applied to
4.16. Equivalence: Full Column Space, Nul , Consistency (Assignment 4, Task 8)
Let
is consistent for every . . .
Click to see the solution
Key Concept: These three conditions all say the same thing: every output vector is achievable, i.e.,
(a)
(b)
(b)
(c)
Answer: All three are equivalent; each follows from the others via the column space, rank, and Rank-Nullity Theorem.
4.17. Normal Vectors and Orthogonal Complement Construction (Assignment 4, Task 9)
Consider the planes in
Find normal vectors
to .Find bases for
and .Construct a
matrix whose row space is . Show that .Construct a
matrix whose column space is . Show that .
Click to see the solution
(a) Normal vectors:
(coefficients of ) or simplified (coefficients of )
(b) Bases:
- Basis for
: Free variables . Set : , so (multiply by 3). Set : , so (multiply by 3). Basis: . - Basis for
: . Free: . Set : . Set : . Basis: .
(c) Matrix
Take a basis for
(d) Matrix
Take a basis for
$(A_2^T) = $ left null space of
From row 1:
Answer:
4.18. Four Subspaces from Row-Equivalent Matrices (Assignment 4, Task 10)
The matrices below are row equivalent:
Find
and without further row reduction.Find a basis for
and a basis for .Find a basis for
.Find a basis for
.
Click to see the solution
Key Concept: Row equivalent matrices have the same row space and null space. The echelon form
(a) Rank and nullity:
(b) Bases for
: The nonzero rows of : : Pivots of are in columns 1 and 2. Use the corresponding columns of the original :
(c) Basis for
RREF from
Free variables:
: , . . : , . . : , . .
(d) Basis for
Answer:
4.19. Four Subspaces and Orthogonality Verification (Assignment 4, Task 11)
Let
Click to see the solution
- Row reduce
:
Swap
All 3 columns are pivot columns.
- Bases:
: The 3 pivot columns of form a basis: : Nonzero rows of REF: (as row vectors in ). (no free variables). : . Solve (i.e., row reduce ) to find 1 vector.
- Orthogonality:
is trivial since . : verify the basis vector of is orthogonal to each column of .
Answer:
4.20. Four Subspaces of a Matrix (Assignment 4, Task 12)
Let
Click to see the solution
- Row reduce:
Pivots in columns 1 and 2.
- Bases:
: Columns 1 and 2 of original : . : . : Set : . . Set : . . Set : . . : . (since , has full row rank).
- Orthogonality:
: Verify e.g. ✓. : trivially satisfied since .
Answer:
4.21. Dimensions of Four Subspaces Depending on Parameters (Assignment 4, Task 13)
Find the dimensions of the four fundamental subspaces of
Click to see the solution
Key Concept: The rank depends on the parameters. Row reduce and determine when rows become linearly dependent.
Row reduce:
Case analysis:
- Generic case (
and ): All 3 pivots exist. . Dimensions: , , , . - Case
, : Row 2 becomes . After swapping with row 3: pivots in columns 1 and 3. . Dimensions: , , , . - Case
, : Row 3 becomes zero. . Dimensions: , , , . - Case
, : Both conditions. Row 2 and row 3 become and . . (Or if row 2 becomes zero too — check: , not zero. So .)
- Generic case (
Answer:
| Condition | |||
|---|---|---|---|
| 3 | 0 | 0 | |
| 2 | 1 | 1 |
4.22. Row Reduce to Echelon Form and Identify Free Variables (Tutorial 4, Task 1)
Reduce
Click to see the solution
Matrix
Row reduce:
Rank:
. Pivots in columns 1 and 2. Free variables: and .
Matrix
Row reduce:
Rank:
. Pivots in columns 1 and 2. Free variable: .
Answer:
: rank 2, free variables . : rank 2, free variable .
4.23. Column Space of an Invertible Matrix (Tutorial 4, Task 2)
If
Click to see the solution
Key Concept: For an invertible matrix, the rank equals the number of rows (and columns), so the column space is the entire ambient space.
If
Why? Because
Answer:
4.24. Solvability Condition and Complete Solution (Tutorial 4, Task 3)
Under what condition on
Click to see the solution
Key Concept: Augmented matrix row reduction reveals the solvability condition as a constraint on
- Row reduce
:
Solvability condition: The last row requires
, i.e.:Complete solution (when the condition holds): Free variable
.- From row 2:
. - From row 1:
.
- From row 2:
Answer: Solvability condition:
4.25. Choose to Control Rank (Tutorial 4, Task 4)
Choose the number
Click to see the solution
Matrix
Row reduce:
Rows 1 and 2 are proportional, so the first two rows contribute only one pivot. Rank depends on
- (a) Rank 1: Need the third row to also be zero:
. - (b) Rank 2: Need
(so the third row gives a second pivot). - (c) Rank 3: Impossible — rows 1 and 2 are proportional, maximum rank is 2.
Matrix
Row reduce:
- (a) Rank 1: Need
. - (b) Rank 2: Need
. - (c) Rank 3: Impossible for a
matrix (rank ).
Answer:
| Rank 1 | Rank 2 | Rank 3 | |
|---|---|---|---|
| Impossible | |||
| Impossible |
4.26. Gram-Schmidt Process and QR Decomposition (Tutorial 4, Task 5)
Apply the Gram-Schmidt process to
Click to see the solution
Key Concept: Gram-Schmidt produces orthonormal columns
: , . . : Subtract projection of onto : . . . .
: Subtract projections of onto and : , . . . .
and :
Verify:
Answer:
4.27. Symmetric Factorization (Tutorial 4, Task 6)
Compute the symmetric
Click to see the solution
Key Concept: For a symmetric matrix,
Matrix
Gaussian elimination, recording pivots and multipliers:
Pivot 1:
. Multipliers: , .After eliminating column 1:
Pivot 2:
. Multiplier: .After eliminating column 2:
Pivot 3:
.Result:
Matrix
Pivot 1:
Note: This requires
Answer:
with , . with , .
4.28. Subspace, Orthogonal Complement, and Decomposition (Tutorial 4, Task 7)
Find a basis for the subspace
Find a basis for the orthogonal complement
.Find
and so that .
Click to see the solution
Key Concept: The subspace
Basis for
Solve
: . : . : .
(a) Basis for
(b) Decompose
Write
Since
Verify:
Answer:
- Basis for
: . - Basis for
: . , .
4.29. Construct a System with a Given Complete Solution (Test I Recap, Task 1)
I. Find a
- Find a
system with solutions exactly when .
Click to see the solution
Key Concept: The complete solution consists of a particular solution plus the null space. We need to reverse-engineer the matrix and right-hand side from this solution.
Part I: Find a
Identify the particular solution and null space direction:
- Particular solution:
- Null space direction:
(free variable )
- Particular solution:
Construct the matrix
such that :Verify:
✓Find
:
Part II: Find a
Add a third row that is the sum of the first two:
Answer:
- Part I:
- Part II:
4.30. Find Complete Solutions of SLAEs (Test I Recap, Task 2)
Find the complete solutions of the following systems.
Click to see the solution
Key Concept: The complete solution is the sum of a particular solution and the general homogeneous solution.
Part (a):
Row reduce the augmented matrix:
Back-substitute: From row 2:
. From row 1: . Free variable .Complete solution:
Part (b):
Row reduce:
Free variables
, ; pivot variables , .Complete solution:
Answer:
- (a):
- (b):
4.31. Orthogonal Complement of Row Space (Test I Recap, Task 3)
Find a basis for the orthogonal complement of the row space of
Split
into a row space component and a null space component .
Click to see the solution
Key Concept: The orthogonal complement of the row space is the null space (Fundamental Theorem). For part (b), decompose
Part (a):
Row reduce
Free variable
Part (b):
Basis for
From rows 1 and 2:
Thus
Verify:
Answer:
- (a): Basis for
: - (b):
,
4.32. Why These Orthogonal Statements Are False (Test I Recap, Task 4)
Why are the following statements false?
- Statement 1: If
is orthogonal to , then is orthogonal to . - Statement 2: If
is orthogonal to , and is orthogonal to , then is orthogonal to .
Click to see the solution
Key Concept: These statements claim orthogonality relations that don’t hold. We disprove them with counterexamples in
Statement 1:
Let
Both complements contain
Statement 2:
Let
: ✓ : ✓ ; . . So . False.
Answer: Both statements are false by the counterexamples above.
4.33. Gram-Schmidt Orthogonalization (Test I Recap, Task 5)
Using the following set of non-orthogonal vectors, determine a corresponding set of orthonormal vectors using the Gram-Schmidt process:
Click to see the solution
Key Concept: The Gram-Schmidt process creates orthogonal vectors by subtracting projections onto previously computed vectors, then normalizes to get an orthonormal set.
First vector:
Second vector: Subtract projection of
onto : , . . . .
Third vector: Subtract projections of
onto and : ; . ; . . . .
Answer:
4.34. Solve Using LU-Decomposition (Test I Recap, Task 6)
Solve the matrix equation using LU-decomposition and forward/backward substitution:
Click to see the solution
Key Concept:
- LU decomposition: Gaussian elimination on
: , . After step 1: . . After step 2: . .
- Forward substitution
: - Backward substitution
:
Answer:
4.35. Check Symmetric Positive Definiteness (Test I Recap, Task 7)
Check whether the following matrices are symmetric positive definite:
Click to see the solution
Key Concept: A symmetric matrix is positive definite iff all its leading principal minors are positive (Sylvester’s criterion).
Matrix
✓ ✓ ✓
Matrix
✓ ✓ ✓
Matrix
✓ ✓ (expanding along row 2) ✓
Answer: All three matrices